import Vue from 'vue'
import Router from 'vue-router'
import store from "@/vuex/store"

import login from '@/components/page/login'
import dataScreen from '@/components/page/dataScreen'
import home from '@/components/page/home'



Vue.use(Router)
export const constantRoutes =  store.state.constantRoutes

export default new Router({
  // mode: 'history',
  scrollBehavior(to, from, savedPosition) { //路由跳转返回首页
    return {
      x: 0,
      y: 0
    }
  },
  routes: constantRoutes,

})
